﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CoolERP_Entities;
using CoolERP_DAL;

namespace CoolERP_BLL
{
    public class JCCDBLL : BaseBLL<JCCD>
    {       
        public JCCDBLL() { }

        public List<vJCCD> GetJCCD(Dictionary<string, string> dc, string orderExpr, int? pageIndex, int pageSize, out int totalCount)
        {
            IJCCDDAL _dal = new JCCDDAL(context);
            return _dal.GetJCCD(dc, orderExpr, pageIndex, pageSize, out  totalCount);
        }

        /// <summary>
        /// 返回进出仓单明细
        /// </summary>
        /// <param name="ID">进出仓单ID</param>
        /// <param name="iType">1：物料；2：产品；3：包装箱</param>
        public List<JCCDMXBModel> GetJCCDMXB(Guid JCCDID, int iType)
        {
            IJCCDDAL _dal = new JCCDDAL(context);
            return _dal.GetJCCDMXB(JCCDID, iType);
        }

        /// <summary>
        /// 进仓单确认
        /// </summary>
        public bool JcdConfirm(Guid ID)
        {
             IJCCDDAL _dal = new JCCDDAL(context);
             return _dal.JcdConfirm(ID);
        }

        /// <summary>
        /// 出仓单确认
        /// </summary>
        public bool CcdConfirm(Guid ID)
        {
            IJCCDDAL _dal = new JCCDDAL(context);
            return _dal.CcdConfirm(ID);
        }
    }
}
